n, x = map(int, input().split())
ints = list(map(int, input().split()))
lsum = sum(ints)
print(abs(abs(lsum)//-x))
#include <bits/stdc++.h>
#include<stack>
#include<deque>
#include<set>
#define loop(start,lessThan,incOrDec) for(int i=start;i<lessThan;i+=incOrDec)
#define loop1(nn10) loop(0,nn10,1)
#define farray(as) loop1(arrays(as)){cin>>as[i];}
#define arrays(ass) sizeof(ass)/sizeof(ass[0])
#define ll long long
#define ull unsigned long long
#define pb(n1) push_back(n1)
#define whilep int p; cin>>p;while(p--)
#define be(v) v.begin(),v.end()
using namespace std;
int check(int m,int a[],int n){
int pre=m;
ll f[n+1]={0};
f[pre]++;
loop1(n-1){
int p2=pre+a[i];
if(p2<1)return -1;
if(p2>n)return 1;
if(f[p2])return 2;
f[p2]++;
pre=p2;
}
return 0;
}
int check(int n,int a[]){
int s=1,e=n,m;
while(s<=e){
m=(s+e)/2;
int k=check(m,a,n);
if(!k)return m;
if(k==2)return -1;
else if(k==1){
e=m-1;
}else{
s=m+1;
}
}
return -1;
}
void put(ll si){
loop1(si/2)cout<<4;
loop1(si/2)cout<<7;
}
int size1(ll n){
string s=to_string(n);
return s.size();
}
bool check(ll n){
int se=0,fo=0;
string s=to_string(n);
n=s.size();
if(n%2)return false;
loop1(n){
if(s[i]!='7'&&s[i]!='4')return false;
if(s[i]=='7')se++;
if(s[i]=='4')fo++;
}
return (fo==se);
}
int vowel(char a)
{
if(a=='a'||a=='e'||a=='i'||a=='o'||a=='u')return 1;
return 0;
}
map<int,set<string>>m;
bool checkset(set<string>s1,set<string>s2){
if(s1.size()>s2.size())return false;
set<string>::iterator it;
for(it=s1.begin();it!=s1.end();it++){
if(s2.find(*it)==s2.end())return false;
}
return true;
}
struct com{
bool operator()(const pair<int,pair<int,int>>p1,pair<int,pair<int,int>>p2)const{
if(p1.first<p2.first)return true;
if(p1.second.first<p2.second.first)return true;
return false;
}
};
void pr(set<pair<int,pair<int,int>>,com> s){
set<pair<int,pair<int,int>>>::iterator it;
for(it=s.begin();it!=s.end();it++){
pair<int,pair<int,int>>p=*it;
cout<<"===>"<<p.first<<' '<<p.second.first<<' '<<p.second.second<<'\n';
}
}
bool isPrefect(ll n){
int sum=0;
while(n){
int num=n%10;
sum+=num;
if(sum>10)return false;
n/=10;
}
return sum==10;
}
int main()
{
cin.tie(0);
cin.sync_with_stdio(0);
int n,max1,psum=0,nsum=0,x;cin>>n>>max1;
map<int,bool>m;
loop1(n){
cin>>x;
if(x>0)psum+=x;
else nsum+=abs(x);
m[x]=true;
}
int c=0;
if(psum<nsum){
int ineed=nsum-psum;
int j=max1;
for(;j>0&&ineed!=0;j--){
if(!m[j]&&j<=ineed){
c++;
ineed-=j;
}
}
}else{
int ineed=psum-nsum;
int j=-1*max1;
for(;j<0&&ineed!=0;j++){
if(!m[j]&&abs(j)<=ineed){
c++;
ineed-=abs(j);
}
}
}
cout<<c;
}
1553C - Penalty | 1474E - What Is It |
1335B - Construct the String | 1004B - Sonya and Exhibition |
1397A - Juggling Letters | 985C - Liebig's Barrels |
115A - Party | 746B - Decoding |
1424G - Years | 1663A - Who Tested |
1073B - Vasya and Books | 195B - After Training |
455A - Boredom | 1099A - Snowball |
1651D - Nearest Excluded Points | 599A - Patrick and Shopping |
237A - Free Cash | 1615B - And It's Non-Zero |
1619E - MEX and Increments | 34B - Sale |
1436A - Reorder | 1363C - Game On Leaves |
1373C - Pluses and Minuses | 1173B - Nauuo and Chess |
318B - Strings of Power | 1625A - Ancient Civilization |
864A - Fair Game | 1663B - Mike's Sequence |
448A - Rewards | 1622A - Construct a Rectangle |